import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import GameView from '../views/GameView.vue'
import houtaiView from '../views/houtaigl/houtaiView.vue'
import user from '../views/houtaigl/tables.vue'
import xiangqing from '../views/houtaigl/xiangqing.vue'
import rights from '../views/houtaigl/rights.vue'
import goods from '../views/houtaigl/goods.vue'
import order from '../views/houtaigl/order.vue'
import settings from '../views/houtaigl/settings.vue'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  {
    path: '/game',
    name: 'game',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/GameView.vue')
  },
  {
    path: '/zujian',
    name: 'zujian',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/zujian.vue')
  },
  {
    path: '/login',
    name: 'login',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/login.vue')
  }

]

// const routes = [
//   {
//     //后台
//     path: '/',
//     // name: 'houtais',
//     component: houtaiView,
//     children:[
//       //页面打开显示用户管理
//       { path: '/',
//       name: 'users',
//       component: user},
//       {
//         //用户管理
//         path: '/user',
//         name: 'user',
//         component: user,
//       },
//       {
//         // 用户信息
//         path: '/xiangqing',
//         name: 'xiangqing',
//         component: xiangqing,
//       },,
//       {
//         // 权限管理
//         path: '/rights',
//         name: 'rights',
//         component: rights,
//       },
//       {
//         // 商品管理
//         path: '/goods',
//         name: 'goods',
//         component: goods,
//       },
//       {
//         // 订单管理
//         path: '/order',
//         name: 'order',
//         component: order,
//       },
//       {
//         //系统管理
//         path: '/settings',
//         name: 'settings',
//         component: settings,
//       }
//     ]
//   },
//   {
//     path: '/about',
//     name: 'about',
//     // route level code-splitting
//     // this generates a separate chunk (about.[hash].js) for this route
//     // which is lazy-loaded when the route is visited.
//     component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
//   },
//   {
//     path:'/game',
//     name:'game',
//     component: ()=> import('../views/GameView.vue')
//   }
// ]

const router = new VueRouter({
  routes
})

export default router
